package com.outsourcing.bottle.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.outsourcing.bottle.R;
/**
 * 
 * @author 06peng
 *
 */
public final class LogoFragment extends Fragment {
	
	int currentItem;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.logo_fragment, null);
		ImageView logo = (ImageView) view.findViewById(R.id.logo);
		Bundle bundle = getArguments();
		if (bundle != null) {
			currentItem = bundle.getInt("logo");
			switch (currentItem) {
			case 0:
				logo.setImageResource(R.drawable.logo_new);
				break;
			case 1:
				logo.setImageResource(R.drawable.splash_slide_1);
				break;
			case 2:
				logo.setImageResource(R.drawable.splash_slide_2);
				break;
			case 3:
				logo.setImageResource(R.drawable.splash_slide_3);
				break;
			case 4:
				logo.setImageResource(R.drawable.splash_slide_4);
				break;
			default:
				logo.setImageResource(R.drawable.logo_new);
				break;
			}
		}
		return view;
	}
}
